Chris Pollett > Old Classes >
CS157a

( Print View )

Grades: [Sec4]

Submit: [Sec4]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                            












HW#5 --- last modified January 01 1970 00:00:00..

Solution set.

Due date: May 13

Files to be submitted:
  university.mdb
  sorta_related.sql
  sorta_related.java
  Ch14Ch15.doc

Purpose:To gain experience with Microsoft access, PL/SQL, JDBC, and database normal forms.

Specification:

Perform the EER to relational mapping described in class on figure 4.10 from the book. Then create an MS Access database university.mdb based on the mapping you got. Populate each of the tables with some test rows. Then create a query in Access that returns all the second year grad students registered in a section taught by Professor Pollett.

Next, write a file sorta_related.sql. This file should create a table Parent(X, Y) here X and Y are varchar(15)'s. It should then populate this table with a hundred rows (you may or may not want to do this with a PL/SQL stored procedure). Then this file should have a PL/SQL procedure which when given an X returns all the Y's that are sorta related to X. By definition, Y is sorta related to X if Y is a sibling of X or if Y is an ancestor of X or if Y is a sibling of someone who is sorta related to X. Y is an ancestor of X if Y is a parent of X or if Y is a parent of an ancestor of X.

After this, write a JDBC program sorta_related.java which is run from the command line with a line like:

  java sorta_related Bob

(or some other name than bob) and then prints out all the people in the Parent table sorta related to Bob.

Do problems 14.18, 14.20, 15.27 out of the book and turn them in the file Ch14Ch15.doc

Point Breakdown

Departmental coding guidelines for Java followed1pt
EER mapping to Access DB1pt
Access query 1pt
Creating and populating Parent table 1pt
PL/SQL sorta_related procedure1pt
JDBC sorta_related program connects to DB okay1pt
JDBC sorta_related program gives correct output. 1pt
14.181pt
14.201pt
15.271pt
Total10pts